﻿using System;

namespace PKTools.Scheduler
{
    public interface ITask
    {
        IJobStep GetJobStep();

        void Create();

        void DeleteTask();

        void BeforeExecution(DateTime currentTime);

        void Execute();

        void Success(DateTime currentTime);

        void Fail(DateTime currentTime, Exception ex);

        bool CanRetry();

        void Retry(Exception ex);

        void FinalFail(Exception ex);
    }
}
